package com.example.controller;


import com.example.feign.HelloRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hewei
 * @Title: ConsumerController
 * @ProjectName springcloud-test
 * @Description: 服务消费者，远程调用hello
 * @date 2018/11/16 16:37
 */
@RestController
public class ConsumerController {

    @Autowired
    private HelloRemote helloRemote;

    @GetMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return helloRemote.Hello(name);
    }

}
